﻿@model Model.EntrustManage.E_tb_OutsourcingTesting
@{
    ViewBag.Title = "OutsourcingTestingEdit";
}
<!DOCTYPE html>

<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
</head>
<body>
        @using (Ajax.BeginForm("Save", "OutsourcingTesting", new AjaxOptions { HttpMethod = "Post", OnSuccess = "handle", OnFailure = "failed" }, new { @id = "frmUpdate" }))
        {
            @Html.HiddenFor(m => m.OutsourcingID, new { @id = "HidOutsourcingID" })
            @Html.HiddenFor(m => m.EditType, new { @id = "HidEditType" })
            @Html.HiddenFor(m => m.IsComplete, new { @id = "HidIsComplete" })
            <table border="0" cellpadding="0" cellspacing="0" width="98%" class="DialogTable">
                 <tr>
                    <td width="70px" align="right">委托单位：</td>
                    <td align="left" >@Html.TextBoxFor(m => m.EntrustCompany, new { @style = "width:99%;", @id = "txt_EntrustCompany" })</td>
                    <td align="right">送检日期：</td>
                    <td align="left">@Html.TextBoxFor(m => m.SubmissionTime, new { @style = "width:99%;", @onclick = "WdatePicker()", @id = "txt_SubmissionTime" })</td>
                </tr>
                <tr>
                    <td width="70px" align="right">检验项目：</td>
                    <td align="left" >@Html.DropDownListFor(m => m.ProjectID, ViewData["ProjectList"] as SelectList)</td>
                    <td width="70px" align="right">样品名称：</td>
                    <td align="left" style="width:160px;">@Html.DropDownListFor(m => m.SampleID, ViewData["SampleList"] as SelectList, new { @style = "width:150px;" })</td>
                </tr>
                <tr>
                    <td align="right">送检单位：</td>
                    <td align="left">@Html.TextBoxFor(m => m.SubmissionCompany, new { @style = "width:99%;", @id = "txt_SubmissionCompany" })</td>
                    <td colspan="2"></td>
                </tr>
                <tr>
                    <td align="right">计量报告：</td>
                    <td align="left" >@Html.TextBoxFor(m => m.OutsourcingReport, new { @style = "width:95%;", @id = "txt_OutsourcingReport" })</td>
                    <td align="right"><input type="text" id="uploadify_File" /></td>
                    <td align="left" ></td>
                </tr>
                <tr>
                    <td colspan="4" align="center">
                        <a href="javascript:void(0)" onclick="$('#frmUpdate').submit()"><img src="~/Content/Images/baocun.png" height="20px" /></a>
                        <a href="javascript:void(0)" onclick="Close()"><img src="~/Content/Images/quxiao.png" height="20px" /></a>
                    </td>
                </tr>
            </table>
        }
        <!--文件上传-->
        <script type="text/javascript">
    /*上传文件控件*/
    $("#uploadify_File").uploadify({
        'uploader': '@Url.Content("~/Scripts/uploader/uploadify.swf")',
        'script': '@Url.Action("Import", "ShowImage")',
        'cancelImg': '@Url.Content("~/Scripts/uploader/cancel.png")',
        'folder': 'UpFile',
        'queueID': 'fileQueue',
        'auto': false,
        'multi': false,
        'height': 20,
        'width': 75,
        'fileSizeLimit': '10240KB',
        'fileTypeDesc': '文档类型',
        'fileTypeExts': '*.doc;*.pdf;*.jpg;*.png;*.gif;*.bmp;*.*;',
        'buttonImg': '@Url.Content("~/Content/Images/daochuwenjian.png")',
        'onComplete': funFile,
        'onSelect': function (e, queueId, fileObj) {
            $('#uploadify_File').uploadifyUpload();
        },
        'onCancel': function (file) {
        }
    });
    /*结束 上传文件控件*/
    function funFile(event, queueID, fileObj, response, data) {
        if (response == "false") {
            alert("文件上传出错！");
        }
        else {
            $('#txt_OutsourcingReport').val(response);
            alert("成功上传！");
        }
    }
    </script>
</body>